class ERBD():    
    
    def __init__(self,name):
        self.name = name
        self.entry=None
        self.all_nodes = {}
    
    def set_cp_time(self,cp_time):
        self.cp_time = cp_time
    
    def update_sys_status(self,event):        
        status, node = event
        for cs in self.cutsets:
            if node.name in cs.events_list:
                index = cs.events_list.index(node.name)
                cs.tag[index] = 0
                if sum(cs.tag) == 0:
                    return 0 # 系统故障
            
        return 1